home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Other Stuff / Demos ƒ / Demo AppMaker / Demo AppMaker™ / Demo AppMaker™.rsrc / TmPT_103_Doc < prev    next >
Encoding:
Text File  |  1990-03-23  |  1.3 KB  |  56 lines

  1. { %filename% -- document methods }
  2. { Created %date% %time% by AppMaker }
  3.  
  4. {    This module overrides the AppMaker-generated code in z%Appname%Doc.%    %}
  5. {    It provides a place for you to add your own code and still be able to    }
  6. {    generate code for new changes to the user interface.  This module will    }
  7. {    not be regenerated by AppMaker unless you delete it.  Its superclass,    }
  8. {    z%Appname%Doc, may be regenerated to handle user interface changes    %    %}
  9. {    without losing your hand-coded changes to this module.                    }
  10.  
  11. Unit %unitname%;
  12. Interface
  13.  
  14. Uses
  15.     TCL,
  16.     AMCL,
  17.     z%AppName%Intf,
  18.     %AppName%Intf,
  19.     ResourceDefs;
  20.  
  21. {----------}
  22. Implementation
  23.  
  24. {----------}
  25. Function C%Appname%Doc.ReadData        (var theData:    Handle): Boolean;
  26. var
  27.     theError:        OSErr;
  28. Begin
  29.     gApplication.RequestMemory (FALSE, FALSE);
  30.     theError := CDataFile (itsFile).ReadAll (theData);
  31.     if theData = nil then begin
  32.         { Acknowledge (couldntReadID); }
  33.         ReadData := FALSE;
  34.     end else begin
  35.         ReadData := TRUE;
  36.     end; 
  37. End; {ReadData}
  38.  
  39. {----------}
  40. Procedure C%Appname%Doc.WriteData;
  41. Begin
  42.     { application-specific write data to itsFile }
  43. End; {WriteData}
  44.  
  45. {----------}
  46. Procedure C%Appname%Doc.DoCommand    (theCommand: longint);
  47. Begin
  48.     case theCommand of
  49.         0:    ;
  50.         otherwise
  51.             inherited DoCommand (theCommand);
  52.     end; {case}
  53. End; {DoCommand}
  54.  
  55. End. {%unitname%}
  56.